<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="java.text.DateFormat"%>
<%@page import="com.ereport.entity.OppParts"%>
<%@page import="java.util.List"%>
<%@page import="com.ereport.entity.Opportunity"%>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>
 <style>
  	#field, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: 11px; }
  	label {  width: 14em; }
	br { clear: both; }
	input.error { border: 1px solid red;  }
	select.error{ border: 1px solid red;  }
	label.error {
		padding-left: 16px;
		margin-left: .3em;
		color: red;
	}
	.textfield{
		height: 22px;
		width: 180px; 
	}
</style>

</head>
<body>
<form action="<%=application.getContextPath() %>/opportunity/save.do" method="post" name="myform" id="myform"><table width="927" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="common/exe-header.jsp" %>
    </td>
  </tr>
  <tr>
    <td height="600" align="left" valign="top"><table width="927" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="20">&nbsp;</td>
        <td width="643" align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="left" valign="top">&nbsp;<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a></td>
              <td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
            </tr>
          </table>
        </td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td width="20">&nbsp;</td>
        <td align="center" valign="top" class="heading">Enquiry Report</td>
        <td width="20">&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="right"></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td align="center" valign="top">
        <%
        Opportunity opp=(Opportunity)request.getAttribute("enqReport");
        System.out.println("opp is "+opp);
       if(opp!=null){
        %>
        <table width="870" border="0" cellspacing="0" cellpadding="0">
       <tr>
            <td align="left" valign="top">
           <table width="895" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="box-border1">
                  <tr>
                    <td width="366"><table width="348" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                          <td width="14">&nbsp;</td>
                          <td width="124">&nbsp;</td>
                          <td width="199">&nbsp;</td>
                          <td width="11">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="28">&nbsp;</td>
                          <td align="left" valign="top" class="content">Organisation Name</td>
                          <td align="left" valign="top">
                            <input type="text" name="org" id="org" class="textfield"  value="<%=opp.getOrgName() %>" readonly="readonly"/>                            </td>
                          <td align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                          <td align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td align="left" height="28" valign="top" class="content">Name Of User </td>
                          <td align="left" valign="top">
                          	<input type="text" name="user" id="user" class="textfield" value="<%=opp.getContactName() %>" readonly="readonly"/></td>
                          <td align="left" valign="top">&nbsp;</td>
                        </tr>
                        
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                          <td align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td align="left" valign="top" height="28" class="content">Due Date </td>
                          <td align="left" valign="top">
                          <%
                          String ddate="";
                         Date dat=opp.getDueDate();
                          DateFormat dfmt=new SimpleDateFormat("dd-MM-yyyy");
                          	ddate=dfmt.format(dat.getTime());
                          %>
                          <input name="dueDate" id="dueDate" type="text" class="textfield" value="<%=ddate %>" readonly="readonly"/></td>
                          <td align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                          <td align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td align="left" valign="top" height="28" class="content">Project Name </td>
                          <td align="left" valign="top"><input name="prjname" type="text" class="textfield" value="<%=opp.getProjName()%>" readonly="readonly"/></td>
                          <td align="left" valign="top">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                          <td align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td align="left" valign="top" height="28" class="content">Opportunity Name </td>
                          <td align="left" valign="top"><input name="opprname" type="text" class="textfield" value="<%=opp.getOppName()%>" readonly="readonly"/></td>
                          <td align="left" valign="top">&nbsp;</td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top"></td>
                          <td height="5" align="left" valign="top"></td>
                          <td align="left" valign="top"></td>
                        </tr>
                       
                        <tr>
                          <td>&nbsp;</td>
                          <td height="28" class="content">Quote Currence </td>
                          <td><input name="curr" type="text" class="textfield" value="<%=opp.getCurrncy()%>" readonly="readonly"/>
                          </td>
                          <td>&nbsp;</td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                    </table></td>
                    <td width="330" align="left" valign="top"><table width="348" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td height="21">&nbsp;</td>
                          <td width="100">&nbsp;</td>
                          <td width="190">&nbsp;</td>
                        </tr>
                        <tr>
                          <td >&nbsp;</td>
                          <td align="left" valign="top" height="28" class="content">Division</td>
                          <td align="left" valign="top">
                          <input type="text" name="divi" id="divi" class="textfield" value="<%=opp.getDivision()%>" readonly="readonly"/></td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td align="left" valign="top" class="content">Enquiry Type </td>
                          <td align="left" height="28" valign="top">
                           <input type="text" name="enqType" id="enqType" class="textfield" value="<%=opp.getEnqType()%>" readonly="readonly"/>
						  </td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td align="left" valign="top" class="content">Bid Type </td>
                          <td align="left" valign="top"><table width="70%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <td width="19%">
                                <%
                                if(opp.getTechBid()==true){
                                %>
                                 <input type="checkbox" name="techbid" value="" checked="checked"  disabled="disabled"/> 
                                <%
                                }else {
                                %>
                                <input type="checkbox" name="techbid" value="" disabled="disabled" />     
                                <%
                                }
                                %>
                                </td>
                                <td width="81%" height="28" class="content">Technical Bid </td>
                              </tr>
                              <tr>
                                <td height="5"></td>
                                <td height="5" class="content"></td>
                              </tr>
                              <tr>
                                <td>
                                <%
                                if(opp.getPriceBid()==true){
                                %>
                                <input type="checkbox" name="pricebid" value="" checked="checked" disabled="disabled"/>
                                <%
                                }else {
                                %>
                                <input type="checkbox" name="pricebid" value="" disabled="disabled"/>    
                                <%
                                }
                                %>
                                </td>
                                <td class="content" height="28">Price Bid </td>
                              </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                        </tr>
                        <tr>
                          <td>&nbsp;</td>
                          <td class="content" height="28">Executive Name </td>
                          <td><input name="exeName" type="text" class="textfield" value="<%=opp.getExeName()%>" readonly="readonly"/></td>
                        </tr>
                        <%-- <tr>
                          <td>&nbsp;</td>
                          <td align="left" valign="top" height="28" class="content">Probability </td>
                          <td align="left" valign="top">
                          <input type="text" name="prob" id="prob" class="textfield" value="<%=opp.getProbability()%>%" readonly="readonly"/>
                          </td>
                        </tr> --%>
                        <tr>
                          <td height="5"></td>
                          <td height="5" align="left" valign="top" class="content"></td>
                          <td height="5" align="left" valign="top"></td>
                        </tr>
                        
                       
                       
                        <tr>
                          <td>&nbsp;</td>
                          <td class="content">&nbsp;</td>
                          <td>&nbsp;</td>
                        </tr>
                    </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="10" align="left" valign="top"></td>
              </tr>
              
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td>
                <%
                List<OppParts> prtList=(List<OppParts>)request.getAttribute("partsList");
                if(prtList!=null){
                %>
                <table width="892" border="0" align="center" cellpadding="4" cellspacing="1" bgcolor="#787878"  class="tablebox" id="iTable" >
                  <tr style=" background:url('<%=application.getContextPath() %>/images/hed-bg-block-2.jpg'); background-repeat:repeat-x;">
                    <td width="30" height="30" align="left" valign="middle" class="hed" >S.No</td>
                    <td width="68" align="left" valign="middle" class="hed"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Part No </td>
                    <td width="124" align="left" valign="middle" class="hed"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Quantity </td>
                    <td width="51" align="left" valign="middle"  class="hed"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Make</td>
                    <td width="177" align="left" valign="middle"  class="hed"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Description</td>
                    <td width="90" align="left" valign="middle"  class="hed"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Application</td>
                    <td width="144" align="left" valign="middle"  class="hed"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Specification</td>
                  </tr>
                  <%
                 	 for(int i=0;i<prtList.size();i++){
                  %>
                  <tr>
 		            <td bgcolor="#cccccc" align="center"><%=i+1 %></td>
                    <td align="left" valign="top" bgcolor="#cccccc"><input name="prtno1" id="prtno1"  type="text" value="<%=prtList.get(i).getPrtnum()%>" size="5"  class="tdinput"  readonly="readonly"/></td>
                    <td align="left" valign="top" bgcolor="#cccccc"><input name="qnty1" id="qnty1" type="text" value="<%=prtList.get(i).getQty()%>" size="5" class="tdinput" readonly="readonly"/></td>
                    <td align="left" valign="top" bgcolor="#cccccc"><input name="make1" id="make1" type="text" value="<%=prtList.get(i).getMake()%>" size="5" class="tdinput" readonly="readonly"/></td>
                    <td align="left" valign="top" bgcolor="#cccccc"><input name="decri1" id="decri1" type="text" value="<%=prtList.get(i).getDescription()%>" size="5" class="tdinput" readonly="readonly"/></td>
                    <td align="left" valign="top" bgcolor="#cccccc"><input name="applic1" id="applic1" type="text" value="<%=prtList.get(i).getApplication()%>" size="5" class="tdinput" readonly="readonly"/></td>
                    <td align="left" valign="top" bgcolor="#cccccc"><input name="spec1" id="spec1" type="text" value="<%=prtList.get(i).getSpecification()%>" size="5" class="tdinput" readonly="readonly"/></td>
                  </tr>
                 <%
                 	 }
                 %>
                </table>
                <%
                }
                %>
                </td>
              </tr>
              <tr>
                <td height="5"></td>
              </tr>
            </table>                       </td>
  </tr>
         
          <tr>
            <td height="10" align="left" valign="top">&nbsp;</td>
          </tr>
         
          <tr>
            <td height="10"></td>
          </tr>
          <tr>
            <td align="right" valign="top">&nbsp;</td>
          </tr>
          
          <tr>
            <td align="left" valign="top">&nbsp;</td>
          </tr>
        </table>
        <%
       		}else {
       	        %>
       	        <p class="box-border1 hed-blc" style="font-size: 13px" > No Records Found</p>
       			<%
       	        }
       	        
        %>
        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
    </table></td>
  </tr>
  <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
</table>
</form>
</body>
</html>
